import { defineStore } from "pinia";

// 定义并导出 useAsideStore
export const useAsideStore = defineStore("aside-store", {
  // Store（存储）​
  state: () => ({
    // 是否折叠：默认为 false（不折叠）
    NoFlod: localStorage.getItem("NoFlodState")
      ? localStorage.getItem("NoFlodState")
      : true,
  }),
  getters: {},
  actions: {
    set_NoFlod(opt: boolean) {
      this.NoFlod = opt;
      localStorage.setItem("NoFlodState", String(opt));
    },
  },
});
